FROM python
RUN apt-get update && apt-get install -y vim nginx ssh python-setuptools
RUN pip install requests django django-redis ansible
RUN cd /tmp && \
    wget https://pypi.doubanio.com/packages/80/37/964c0d53cbd328796b1aeb7abea4c0f7b0e8c7197ea9b0b9967b7d004def/supervisor-3.3.1.tar.gz &&\
    tar -xzvf supervisor-3.3.1.tar.gz &&\
    cd supervisor-3.3.1 && \
    python2.7 setup.py install



COPY opstools.conf /etc/nginx/conf.d/
COPY supervisord.conf /etc/

RUN supervisord -c /etc/supervisord.conf